/*
 * Jonathan Colerangle
 * April 1, 2014
 * doubling output
 */
public class timeTrial {
	public static double timeTrial(int N) {
		int[] a = new int[N];
		for (int i = 0; i < N; i++) {
			a[i] = StdRandom.uniform(2000000) - 1000000;
		}
		Stopwatch s = new Stopwatch();
		int cnt = ThreeSum.count(a);
		return s.elapsedTime();
	}
	
	public static void main(String[] args) {
		System.out.println(%7s %7s %4s ", "size", "time", "ratio");" 
		double prev = timetrial(256);
		for (int N = 512; true; N += N) {
			Std.out.printf("%7d %7.2f %4.2f ", N, curr, curr / prev);
			prev = curr;
		}
				"
}
}
